package ZhuHongf;

import java.util.*;

public class FanYI {public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    Map a = new HashMap();
    a.put("车", "car");
    a.put("人", "people");
    a.put("傻逼", "sb");
    a.put("大傻逼", "bigsb");
    a.put("小煞笔", "samllsb");
    while (true) {
        System.out.println("1,汉-英   2，英-汉");
        int b = sc.nextInt();
        if (b == 1) {
            System.out.println("输入汉语");
            String chinese= sc.next();
            if (a.get(chinese) != null) {
                System.out.println(a.get(chinese));
                break;
            } else System.out.println("不存在");

        } else if (b == 2) {
            System.out.println("输入英语");
            String english = sc.next();
            Set set = a.entrySet();
            Iterator it = set.iterator();
            boolean o = true;
            while (it.hasNext()) {
                Map.Entry entry = (Map.Entry) it.next();
                if (entry.getValue().equals(english)) {
                    System.out.println(entry.getKey());
                    o = false;
                    break;

                }
            }
            if (o) {
                System.out.println("无法翻译");
            }
        }
    }

}
}
